< previous page page_500 next page >

Page 500
9f8044bafea36a1f728739c0bb58ef4c.gif
3. What are the four classes you can use to implement objects that manage files?
9f8044bafea36a1f728739c0bb58ef4c.gif
The four classes are SequentialFile, RandomFile, BinaryFile, and RichTextFile.
9f8044bafea36a1f728739c0bb58ef4c.gif
4. What does CSV stand for?
9f8044bafea36a1f728739c0bb58ef4c.gif
CSV stands for comma-separated value.
9f8044bafea36a1f728739c0bb58ef4c.gif
5. What kinds of file operations are best when using the Write # and Input # statements?
9f8044bafea36a1f728739c0bb58ef4c.gif
Random or binary access file mechanisms.
9f8044bafea36a1f728739c0bb58ef4c.gif
6. What is a benefit of implementing binary access file operations?
9f8044bafea36a1f728739c0bb58ef4c.gif
Implementing binary access file operations allows you to assume significant responsibility not just for the contents of the file, but also for the way the file stores its information. Binary access file operations are most useful in situations where you must conserve disk space.
9f8044bafea36a1f728739c0bb58ef4c.gif
7. What is an assumption made about String values in binary files?
9f8044bafea36a1f728739c0bb58ef4c.gif
If you use String variables to persist the information, for instance, the binary file operations in Visual Basic assume that the variable value contains string characters instead of actual binary information. Thus, there's a risk of data integrity being lost in making the mapping between String and binary data.
9f8044bafea36a1f728739c0bb58ef4c.gif
8. What are the advantages of using the Rich Text Box in managing files?
9f8044bafea36a1f728739c0bb58ef4c.gif
The Rich Text Box control makes managing files much simpler. In short, the Rich Text Box control combines the text box, file operations, simple word-processing, and printing and reporting capabilities in one object. As mentioned earlier, the Rich Text Box can hold huge amounts of information, more so than the conventional text box. Plus, it gives you the flexibility to manage .RTF (rich text) and ASCII files (of any extension, but typically .TXT). If you want to store information in row and column format, simply insert commas and the vbNewLine value where you need it. And when you persist information in the comma-separated value (CSV) format, you can open it and read the information in it using the Random Access or Binary Access methods. In fact, as mentioned earlier, in CSV format, you can export the file to Access, Excel, as well as SQL Server and other databases that accept CSV files.
9f8044bafea36a1f728739c0bb58ef4c.gif
9. What is the purpose of the IPersistence, GeneralFile, and IFileSubsystem classes?
9f8044bafea36a1f728739c0bb58ef4c.gif
The IPersistence class is important as an organizer of any event triggering the persistence of information, whether in a database or regular file. This class is not owned by the subsystem but is the gateway for the flow of events with a given

 
< previous page page_500 next page >

If you like this book, buy it!